package com.xnx3.wangmarket.plugin.videoCall.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.xnx3.j2ee.pluginManage.controller.BasePluginController;
import com.xnx3.j2ee.service.SqlService;
import com.xnx3.j2ee.util.ActionLogUtil;
import com.xnx3.kefu.core.util.KefuPropertiesUtil;

/**
 * 腾讯云音视频
 * @author 管雷鸣
 */
@Controller(value="ChatVideoCallPluginController")
@RequestMapping("/plugin/videoCall/chat/")
public class ChatVideoCallPluginController extends BasePluginController{


	/**
	 * 获取用于音视频调起的 UserSig
	 * @param token 当前用户的token
	 * @param otherToken 当前跟我聊天的对方的token
	 * @return 若成功，info返回后台登录成功的sessionid
	 */
	@RequestMapping(value="chat.do")
	public String chat(HttpServletRequest request, Model model){
		ActionLogUtil.insertUpdateDatabase(request, "进入聊天窗口");
		
		model.addAttribute("api", KefuPropertiesUtil.getProperty("kefu.api"));
		model.addAttribute("socket", KefuPropertiesUtil.getProperty("kefu.socket"));
		return "/plugin/videoCall/chat/chat";
	}
	

}
